package com.wmh.baseservice.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author mmx generator
 * @since 2021-10-29
 */
@ApiModel(value="AdPermissions对象", description="管理员权限表")
public class AdPermissions implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "管理员id")
    private Long adId;

    @ApiModelProperty(value = "接口权限")
    private String permissions;

    private Integer status;

    private String remark;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    public Long getId() {
        return id;
    }

    public AdPermissions setId(Long id) {
        this.id = id;
        return this;
    }
    public Long getAdId() {
        return adId;
    }

    public AdPermissions setAdId(Long adId) {
        this.adId = adId;
        return this;
    }
    public String getPermissions() {
        return permissions;
    }

    public AdPermissions setPermissions(String permissions) {
        this.permissions = permissions;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public AdPermissions setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public AdPermissions setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public AdPermissions setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public AdPermissions setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public AdPermissions setVersion(Integer version) {
        this.version = version;
        return this;
    }

    public static final String ID = "id";

    public static final String AD_ID = "ad_id";

    public static final String PERMISSIONS = "permissions";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    @Override
    public String toString() {
        return "AdPermissions{" +
            "id=" + id +
            ", adId=" + adId +
            ", permissions=" + permissions +
            ", status=" + status +
            ", remark=" + remark +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", version=" + version +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            AdPermissions.ID
            ,AdPermissions.AD_ID
            ,AdPermissions.PERMISSIONS
            ,AdPermissions.STATUS
            ,AdPermissions.REMARK
            ,AdPermissions.CREATE_TIME
            ,AdPermissions.UPDATE_TIME
            ,AdPermissions.VERSION
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}